﻿@model EzyGoEzySystem.Models.RouteSuggestModel
@{
    ViewBag.Title = "RouteSuggest";
}

<h2>RouteSuggest</h2>
@using (Html.BeginForm()) {
    <div>
        <fieldset>
            <legend>Route Suggest</legend>
            <table width="100%">
                <tr>
                    <td style="width:150px;">
                        <div class="editor-label">
                            @Html.LabelFor(m => m.Source)
                        </div>
                        <div class="editor-field">
                           @Html.DropDownListFor(m => m.Source, Model.Sources)
                        </div>

                        <div class="editor-label">
                            @Html.LabelFor(m => m.Destination)
                        </div>
                        <div class="editor-field">
                           @Html.DropDownListFor(m => m.Destination, Model.Destinations)
                        </div>
                        <p>
                            <input type="submit" value="Find" />
                        </p>
                    </td>
                    <td>
                        @*@if (Model.Route != null)
                        {
                            <p>@Model.Route</p>
                        }*@

                        @if (Model.Route != null)
                        {
                            foreach (string line in Model.Route.Split(Convert.ToChar(";")))
                            {
                                <p>@line</p>
                            }
                        }
                    </td>
                </tr>
            </table>
        </fieldset>
    </div>
}